import os
import sys

list = os.listdir("./")
list2 = []
dic = {}
for i in list:
	if i[-4:-1] + i[-1]  == ".pdb":
		list2.append(str(i).split(".pdb")[0])
print(list2)
for n in list2:
	os.system("pdb2pqr30 --ff AMBER --titration-state-method propka --with-ph 7 --keep-chain {n}.pdb complex_{n}.pqr --pdb-output {n}_addH.pdb".format(n=n))
	os.system("InterfaceAnalyzer.linuxgccrelease -s {}.pdb -fixedchains A B @pack_input_options.txt".format(n))

os.system("ls *_addH.pdb > list.txt")
os.system("./zrank list.txt")




